﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NMF.Expressions
{
    public class ValueChangedEventArgs : EventArgs
    {
        public ValueChangedEventArgs(object oldValue, object newValue)
        {
            OldValue = oldValue;
            NewValue = newValue; 
        }

        public object OldValue { get; private set; }

        public object NewValue { get; private set; }
    }

    public interface INotifyValue<out T>
    {
        T Value { get; }

        event EventHandler<ValueChangedEventArgs> ValueChanged;

        void Detach();
        void Attach();

        bool IsAttached { get; }
    }

    public interface INotifyReversableValue<T> : INotifyValue<T>
    {
        new T Value { get; set; }

        bool IsReversable { get; }
    }
}
